package com.gitee.alg.sort

/**
 * Project Name: alg
 * Des: 排序器接口
 * Package:com.gitee.alg.sort
 * @author Arlo Sun
 * @date 2021/4/26 - 13:06
 */
interface ArraySort<T : Comparable<T>> {

    //指定比较器,用于区分是升序还是降序
    val compare: (T, T) -> Boolean

    fun sort(array: Array<T>, ascend: Boolean = true): Array<T>

}
